{% extends 'layout.html' %}
{% block content %}
    <div class="container">
        <h1>Order Confirmation</h1>
        <div class="alert alert-success">
            <h4>Thank you for your order!</h4>
            <p>Your order #{{ order.id }} has been received.</p>
        </div>
        
        <h3>Order Details</h3>
        <table class="table">
            <thead>
                <tr>
                    <th>Product</th>
                    <th>Quantity</th>
                    <th>Price</th>
                    <th>Total</th>
                </tr>
            </thead>
            <tbody>
                {% for item in order_items %}
                <tr>
                    <td>{{ item.goods_name }}</td>
                    <td>{{ item.quantity }}</td>
                    <td>${{ item.goods_price }}</td>
                    <td>${{ item.get_total_price }}</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
        
        <div class="text-right">
            <h4>Order Total: ${{ order.get_total }}</h4>
        </div>
    </div>
{% endblock %}